package com.cloud.encrypting_cloud_storage.config;

/**
 * @author leon
 * @Description: TODO(fastjson配置)
 * @date 2022年04月20日 12:45
 */
//@Configuration
public class MyFastJsonConfig {
//    @Bean
//    FastJsonHttpMessageConverter fastJsonHttpMessageConverter(){
//        FastJsonHttpMessageConverter fastJsonHttpMessageConverter = new FastJsonHttpMessageConverter();
//        //防止中文乱码问题
//        List<MediaType> supportedMediaTypes=new ArrayList<MediaType>();
//        supportedMediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
//
//        FastJsonConfig fastJsonConfig = new FastJsonConfig();
//        fastJsonConfig.setCharset(StandardCharsets.UTF_8);
//        fastJsonConfig.setDateFormat("yyyy-MM-dd hh:mm:ss");
//        fastJsonConfig.setSerializerFeatures(
//                SerializerFeature.WriteMapNullValue,
//                SerializerFeature.PrettyFormat,
//                SerializerFeature.WriteNullListAsEmpty,
//                SerializerFeature.WriteNullStringAsEmpty
//        );
//        fastJsonHttpMessageConverter.setFastJsonConfig(fastJsonConfig);
//        return fastJsonHttpMessageConverter;
//    }
}
